package com.matt.controller;



import com.matt.service.NurseryScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/6/9
 * *******************************
 */
@Controller
@Slf4j
public class PortalController {

//    @Autowired
//    private SystemSettingRepository systemSettingRepository;
//
//    @Autowired
//    private EvaluateService evaluateService;

//    @Autowired
//    private CourseOfficialOldAttaRepository courseOfficialOldAttaRepository;
//
//    @Autowired
//    private MeetingService meetingService;

//    @Autowired
//    private NurseryScheduleService nurseryScheduleService;
//
//
//    @Value("${spring.profiles.active}")
//    private String env;

//    @RequestMapping(value = "/evaluate_record/h5/export/{evaluateRecordId}", method = RequestMethod.GET)
//    public ModelAndView webHome(@PathVariable("evaluateRecordId") String evaluateRecordId, Boolean adviseTag, Boolean recommendPlanTag, boolean nurseReport){
//        if (Objects.isNull(adviseTag))
//            adviseTag = true;
//        if (Objects.isNull(recommendPlanTag))
//            recommendPlanTag = false;
//
//        ModelAndView modelAndView = new ModelAndView("record");
//        ExportEvaluateRecordVo recordVo = evaluateService.exportH5(evaluateRecordId, adviseTag, recommendPlanTag, nurseReport);
//        modelAndView.addObject("record", recordVo);
//        modelAndView.addObject("adviseTag", adviseTag);
//        modelAndView.addObject("recommendPlanTag", recommendPlanTag);
//        return modelAndView;
//    }
//
//    @RequestMapping(value = "/evaluate_record/word/export/{evaluateRecordId}")
//    @ResponseBody
//    public StatusResponse testExport(HttpServletResponse response, @PathVariable("evaluateRecordId") String evaluateRecordId, Boolean adviseTag, Boolean recommendPlanTag) throws Exception{
//        String ossFile = evaluateService.exportWord(evaluateRecordId, adviseTag, recommendPlanTag, true);
////        response.sendRedirect(ossFile);
//        return StatusResponse.success(ossFile);
//    }
//
//    @RequestMapping(value = "/view/course_official_old_atta")
//    public ModelAndView getViewCourseOfficialOldAttr(String name) throws Exception{
//        log.info("name :[{}]", name);
//        ModelAndView modelAndView = new ModelAndView("course_official_old_atta");
//        CourseOfficialOldAtta atta = courseOfficialOldAttaRepository.findByName(name);
//        modelAndView.addObject("data", atta);
//        return modelAndView;
//    }
//
//    @RequestMapping(value = "/view/meeting_view/{id}")
//    public ModelAndView meetingView(@PathVariable String id) {
//        ModelAndView modelAndView = new ModelAndView("meeting_view");
//        Meeting meeting = meetingService.getById(id);
//        modelAndView.addObject("meeting", meeting);
//        return modelAndView;
//    }
//
//    @RequestMapping(value = "/view/export_evaluate_excel")
//    public ModelAndView exportEvaluateExcel() {
//        ModelAndView modelAndView = new ModelAndView("export_evaluate_excel");
//        return modelAndView;
//    }
//
//    //获取班级周排课详情  checkId:托班审核id
//    @RequestMapping(value = "/view/get_classes_schedule")
//    @ResponseBody
//    public StatusResponse getClassesScheduleList(String checkId,String childId) {
//        return StatusResponse.success(nurseryScheduleService.getClassesScheduleList(checkId, childId));
//    }
//
//    @RequestMapping("/export_evaluate_excel")
//    public StatusResponse export(HttpServletResponse response) throws Exception {
//        evaluateService.exportExcel(response);
//        return StatusResponse.success(true);
//    }
}
